import 'package:flutter/material.dart';
import 'package:opene/app_theme.dart';

class CommonAppBar extends StatelessWidget with PreferredSizeWidget {
  final String title;
  final Widget leading;
  final List<Widget> actions;

  CommonAppBar({this.title = '', this.leading, this.actions = const []});

  @override
  Widget build(BuildContext context) {
    return AppBar(
      backgroundColor: MyAppTheme.nearlyBlue,
      title: Text(title),
      leading: leading,
      actions: actions,
    );
  }

  @override
  Size get preferredSize => Size.fromHeight(kToolbarHeight);
}